package net.huashitong.oversee.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
import net.huashitong.oversee.dao.TaskVersionLogDao;
import net.huashitong.oversee.entity.TaskVersionLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TaskVersionLogService extends StringPKService<TaskVersionLog> {

    @Autowired
    private TaskVersionLogDao dao;
    @Autowired
    private SysTableService systable;

    @Override
    protected BaseDao<TaskVersionLog, String> getDao() {
        return dao;
    }


    @Override
    protected void beforeSave(TaskVersionLog obj) {
        System.out.println(obj.getSysId()+" before");
        obj.setSysId(systable.updateMaxSysId("t_tasklogs",null));
        System.out.println(obj.getSysId()+" afger");

    }




}
